entry {
    ui::interact-with-window {
        title: { const 'Checkbox Demo' },
        content: Root,
        assets: [StyleSheet],
        on-close: { Some { sys::exit 0 } }
    }
};
asset StyleSheet: AssetCSS 'assets/style.css';

const Root: ui::Component
    \ use let ok := { ui::State Yes },
    { { ui::Box [] } [
        { ui::Checkbox ok },
        { ui::Text (ok.out map &(ok) =>
            if ok: 'checked', else: 'not-checked'
        ) },
        { ui::Button ('toggle', (ok update not)) }
    ] };
